package edu.yngsxy.demo.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.validator.constraints.URL;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;

/**
 * t_user表的mapper
 */
@Data
@TableName("t_user")//说明它是和t_user表对应的
@Validated
public class TUser {
    //这个是无状态的：NONE
    @TableId(type = IdType.AUTO)//自增
    private Integer userid;

    @TableField(value = "userName")
    @Pattern(regexp = "^\\S{2,16}$")
    private String username;

    @Pattern(regexp = "^\\S{6,16}$")
    private String password;

    @Email
    private String email;

    private String phonenumber;

    private String site;

    private Integer utid;

}